package com.wmyg.antifake.repository;

import com.wmyg.antifake.entity.Company;
import com.wmyg.antifake.entity.ProductTag;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author 王卓逸
 * @program TODO
 * @description TODO
 * @create 2019-06-05
 */
@Repository
public interface ProductTagRepository extends JpaRepository<ProductTag, Integer> {

    ProductTag findByTagId(Integer tagId);

    List<ProductTag> findByCompanyOrderByCreateTimeAsc(Company company);

    Page<ProductTag> findByCompanyOrderByCreateTimeAsc(Pageable pageable, Company company);

}
